package chapter2.section5;

import java.io.Console;

/**
 * 程序2-8：利用Console类实现键盘输入
 * 
 * @author 作者姓名
 */
public class ConsoleDemo {
    public static void main(String[] args) {
        Console cons = System.console();
        String account = cons.readLine("请输入账号");
        char[] pwd = cons.readPassword("请输入密码");
    }
}
 